﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace CMD.BAL.CAT
{
    public class Clo
    {
        /// <summary>
        /// Obtiene los datos de los clos
        /// </summary>
        /// <returns></returns>
        public static DataTable GetData()
        {
            DataTable dt;
            //ejecutar store
            dt = CMD_DKT.DAL.SrvDB.ExecuteQuery("exec SP_CMD_CAT_SEL_CLO");
            return dt;
        }
        
        /// <summary>
        /// Obtiene la Zona a partir del Clo en relacion a la tabla CLO_ZONA
        /// </summary>
        /// <param name="id_Clo"></param>
        /// <returns></returns>
        public static DataTable GetData(int id_Clo)
        {

            try
            {
                DataTable dtZona;
                dtZona = CMD_DKT.DAL.SrvDB.ExecuteQuery("exec SP_CMD_CAT_SEL_ZONE   @id_clo  = " + id_Clo.ToString() + "");
                return dtZona;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
